<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8"></meta>
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			"use strict"
			var Animal = function(kind){
				this.kind = kind;
				this.num = null;
			}
			Animal.prototype.setNum = function(num){
				this.num = num;
			}
			var dog = new Animal("dog");
			dog.setNum(11);
			console.log("dog's number is "+dog.num);
			
			var Duck = function(){
				
			}
			Duck.prototype = new Animal("duck");
			var duck = new Duck();
			duck.setNum(13);
			console.log(duck.num);
		</script>
	</body>
</html>